package com.znv.sentinelrepository;

import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;
import java.util.List;

/**
 * @author  pengYongQiang
 * @date 2020/7/8 15:01
 * @version 1.0
 */
public interface MetricEntityDao extends JpaRepository<MetricEntityHolder, Integer> {

    List<MetricEntityHolder> findAllByApp(String app);

    List<MetricEntityHolder> findAllByAppAndResourceAndTimestampBetween(String app, String resource, Date startTime, Date endTime);

}
